﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.controllers.waitingQueue {
    import net.wooga.pets.events.*;
    import net.wooga.pets.models.*;
    import net.wooga.pets.models.world.vos.actors.*;
    import net.wooga.pets.constants.*;
    import org.robotlegs.mvcs.*;
    import net.wooga.pets.models.world.*;

    public class RemoveFromWaitingQueueCommand extends Command {

        public var event:InfoEvent;
        public var worldModel:WorldModel;
        public var userModel:UserModel;

        override public function execute():void{
            var _local1:WaitingPetVO = (this.event.info as WaitingPetVO);
            if (!this.userModel.isVisitFriendsMode()){
                this.worldModel.removeActor(_local1.id);
                this.worldModel.removeFromWaitingQueue(int(this.event.id));
                dispatch(new InfoEvent(EventConstants.ON_REMVED_FROM_WAITING_QUEUE, _local1.id));
            };
        }

    }
}//package net.wooga.pets.controllers.waitingQueue 
